﻿<cts-title id="pnTitle" text="{{strings.Title}}"></cts-title>
<cts-toolbar id="pnToolbar">
    <cts-toolbar-item id="lnkAdd" onclick="add()" class="left-1" src="/res/adm/img/icons/add.png" data-original-title="{{strings.Add}}" ui-jq="tooltip"></cts-toolbar-item>
    <cts-toolbar-item id="lnkUpdateAll" onclick="updateAll()" class="left-2" src="/res/adm/img/icons/save.png" data-original-title="{{strings.UpdateAll}}" ui-jq="tooltip" ></cts-toolbar-item>
    <cts-toolbar-item id="lnkShowHide" onclick="showHidePanelSearch()" class="right-1" src="/res/adm/img/icons/show-hide.png" data-original-title="{{strings.ShowHideSearch}}" ui-jq="tooltip"></cts-toolbar-item>
</cts-toolbar>
<cts-form-pane id="pnSearch" class="df-fp p-height-4" ng-show="variable.ShowSearchPane">
    <cts-label class="top-1 left-1 width-8" text="{{strings.PhotoCd}}"></cts-label>
    <cts-text id="txtPhotoCd" tabindex="10" model="data.PhotoCd" class="top-1 left-4 width-10"></cts-text>
    <cts-label class="top-2 left-1 width-8" text="{{strings.PhotoName}}"></cts-label>
    <cts-text id="txtPhotoName" tabindex="20" model="data.PhotoName" class="top-2 left-4 width-15"></cts-text>
    <cts-label class="top-3 left-1 width-8" text="{{strings.DeleteFlag}}"></cts-label>
    <cts-select id="cboDeleteFlag" tabindex="70" model="data.DeleteFlag" options="data.ListDeleteFlag" class="top-3 left-4 width-6"></cts-select>
    <cts-button id="btnSearch" tabindex="80" class="top-4 left-4 width-8" text="{{strings.Search}}" onclick="search()"></cts-button>
</cts-form-pane>
<cts-grid-Pane id="pnResult" class="p-top-4 left-0" ng-class="{'ma-photos-tblResult': variable.ShowSearchPane, 'ma-photos-tblResult-1': !variable.ShowSearchPane}">
    <table dt-options="tblResult.Options" datatable="ng">
        <thead>
        <tr>
            <td width="30px"></td>
            <td width="30px"></td>
            <td width="30px"></td>
            <td width="100px" text="{{strings.ColPhotoCd}}" order-by="PhotoCd" sort-model="tblResult.Sortable" onclick="sortResult(data)" cts-grid-header="true"></td>
            <td width="150" text="{{strings.ColPhotoName}}" order-by="PhotoName" sort-model="tblResult.Sortable" onclick="sortResult(data)" cts-grid-header="true"></td>
            <td width="80" text="{{strings.ColSortKey}}" cts-grid-header="true"></td>
            <td width="100" text="{{strings.ColDeleteFlag}}" order-by="DeleteFlag" sort-model="tblResult.Sortable" onclick="sortResult(data)" cts-grid-header="true"></td>
            <td width="100" text="{{strings.ColVersionNo}}" order-by="VersionNo" sort-model="tblResult.Sortable" onclick="sortResult(data)" cts-grid-header="true"></td>
            <td width="150" text="{{strings.ColUpdateUser}}" order-by="UpdateUser" sort-model="tblResult.Sortable" onclick="sortResult(data)" cts-grid-header="true"></td>
            <td width="150" text="{{strings.ColUpdateDate}}" order-by="UpdateDate" sort-model="tblResult.Sortable" onclick="sortResult(data)" cts-grid-header="true"></td>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="obj in tblResult.ListData">
            <td><input type="checkbox" ng-model="obj.HasChanged"/></td>
            <td><cts-image src="/res/adm/img/icons/edit.png" onclick="edit(obj)" style="width: 16px;" data-original-title="{{strings.Edit}}" ui-jq="tooltip"></cts-image> </td>
            <td><cts-image src="/res/adm/img/icons/copy.png" onclick="copy(obj)" style="width: 16px;" data-original-title="{{strings.Copy}}" ui-jq="tooltip"></cts-image> </td>
            <td>{{obj.PhotoCd}}</td>
            <td class="editable">
                <cts-text model="obj.PhotoName" tabindex="90" onchange="tblResultChange(data, obj)"></cts-text>
            </td>
            <td class="editable">
                <cts-number model="obj.SortKey" scale="0" min="1" max="999" tabindex="110" onchange="tblResultChange(data, obj)"></cts-number>
            </td>
            <td class="editable">
                <cts-select model="obj.DeleteFlag" options="data.ListGridDeleteFlag" onchange="tblResultChange(data, obj)"></cts-select>
            </td>
            <td>{{obj.VersionNo}}</td>
            <td>{{obj.UpdateUser}}</td>
            <td>{{obj.UpdateDate}}</td>
        </tr>
        </tbody>
    </table>
    <pagination
        boundary-links="true"
        total-items="tblResult.Total"
        items-per-page="tblResult.Limit"
        ng-model="tblResult.Page"
        ng-change="filter()">
    </pagination>
</cts-grid-Pane>
<cts-alert model="alert"></cts-alert>